www.gusucode.com > XYCMS PHP留言板源码 v1.8PHP源码程序 > XYCMS PHP留言板源码 v1.8/xycmslyb_v1.8/xycmslyb_v1.8/install/install.config.php
<?php if(!defined("XYCMS")) exit("Access Denied"); function gdversion(){ //没启用php.ini函数的情况下如果有GD默认视作2.0以上版本 if(!function_exists('phpinfo')){ if(function_exists('imagecreate')) return '2.0'; else return 0; } else{ ob_start(); phpinfo(8); $module_info = ob_get_contents(); ob_end_clean(); if(preg_match("/\bgd\s+version\b[^\d\n\r]+?([\d\.]+)/i", $module_info,$matches)) { $gdversion_h = $matches[1]; } else { $gdversion_h = 0; } return $gdversion_h; } } function TestWrite($d) { $tfile = 'xycms.txt'; $d = preg_replace("#\/$#", '', $d); $fp = fopen("..".$d.'/'.$tfile, 'w'); if(!$fp) return 0; else{ fclose($fp); $rs = @unlink("..".$d.'/'.$tfile); if($rs) return 1; else return 0; } } ?>